package android_design_mode.chapter17_mediator.computer_mediator;

import android_design_mode.chapter17_mediator.computer_mediator.parts.CDDevice;
import android_design_mode.chapter17_mediator.computer_mediator.parts.CPU;
import android_design_mode.chapter17_mediator.computer_mediator.parts.GraphicsCard;
import android_design_mode.chapter17_mediator.computer_mediator.parts.SoundCard;

public class ClientMediator {


    public static void main(String[] args) {
        System.out.println("-----Mediator----");
        MainBoard mediator = new MainBoard();

        CDDevice cdDevice = new CDDevice(mediator);
        CPU cpu = new CPU(mediator);
        GraphicsCard graphicsCard = new GraphicsCard(mediator);
        SoundCard soundCard = new SoundCard(mediator);

        mediator.setCdDevice(cdDevice);
        mediator.setCpu(cpu);
        mediator.setGraphicsCard(graphicsCard);
        mediator.setSoundCard(soundCard);

        cdDevice.load();

    }
}
